package com.clz.hyperit.timing;
import org.quartz.JobExecutionContext;  
import org.quartz.JobExecutionException;  
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.quartz.QuartzJobBean;  
import org.springframework.stereotype.Component;

import com.clz.hyperit.util.MapUtil;
@Component("jobtoDeleteMap")
public class JobtoDeleteMap extends QuartzJobBean {
	private int timeout;  
	private static int i = 0;  

	
	//调度工厂实例化后，经过timeout时间开始执行调度  
	public void setTimeout(int timeout) {  
	this.timeout = timeout;  
	}  
	
	@Autowired
	private MapUtil mapUtil;


	/** 
	* 要调度的具体任务 
	*/  
	@Override  
	protected void executeInternal(JobExecutionContext context)  
	throws JobExecutionException {  
		System.out.println("-------------清除map信息------------");
		mapUtil.map.clear();
	}  
}
